class Solution:
    def moveZeroes(self, nums):
        """
        :type nums: List[int]
        :rtype: void Do not return anything, modify nums in-place instead.
        """
        i, j = 0, 0
        while i < len(nums):
            if nums[i] != 0:
                k = i
                while k > j:
                    nums[k], nums[k-1] = nums[k-1], nums[k]
                    k -= 1
                j += 1
            i += 1
        return nums

s = Solution()
print(s.moveZeroes([0,1,0,2,3,4]))